package com.vueperson.vueperson.t1.CRP;

public class CustomerDAO {
    public DBUtil dbUtil;

    public void addCustomer(String a){
        System.out.println(a+"用户调用数据库");
        if (a .equals("oracle")) {
            this.dbUtil=new OracleDBUtil();
        }
        this.dbUtil=new MysqlDBUtil();
    }

    public static void main(String[] args) {
        CustomerDAO customerDAO=new CustomerDAO();
        customerDAO.addCustomer("mysql");
        customerDAO.dbUtil.getConnection();

    }
}
